#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
const int MOD = 1e9 + 7;
const int N = 2010;

int gcd(int a, int b)
{
    return b ? gcd(b, a % b) : a;
}

ll qui(ll a, ll b)
{
    ll res = 1;
    while(b)
    {
        if(b & 1)res = res * a % MOD;
        b >>= 1;
        a = a * a % MOD;
    }
    return res;
}

ll fac[N], inv_fac[N];
ll S[N][N];

void init()
{
    fac[0] = 1;
    for(int i = 1; i < N; i++)
        fac[i] = fac[i - 1] * i % MOD;
    inv_fac[N - 1] = qui(fac[N - 1], MOD - 2);
    for(int i = N - 1; i > 0; i--)
        inv_fac[i - 1] = inv_fac[i] * i % MOD;
    S[0][0] = 1;
    for (int i = 1; i < N; ++i) {
        for (int j = 1; j < N; ++j) {
            S[i][j] = (j * S[i - 1][j] % MOD + S[i - 1][j - 1]) % MOD;
        }
    }
}

ll comb(int a, int b)
{
    return fac[a] * inv_fac[b] % MOD * inv_fac[a - b] % MOD;
}

struct custom_hash {
	static uint64_t splitmix64(uint64_t x) {
		x ^= x << 13;
		x ^= x >> 7;
		x ^= x << 17;
		return x; 
	}
	size_t operator () (uint64_t x) const {
		static const uint64_t FIXED_RANDOM = chrono::steady_clock::now().time_since_epoch().count(); // 时间戳
		return splitmix64(x + FIXED_RANDOM);
	}
};

void solve(){
    int n, q;
    cin >> n >> q;
    vector<int> a(n + 1);
    for(int i = 1; i <= n; i++) cin >> a[i];
    string s;
    cin >> s;
    s = ' ' + s;
    vector<int> f(n + 1);
    for(int i = 1; i <= n; i++){
        int l = min(i, a[i]), r = max(i, a[i]);
        f[l] ++;
        f[r] --;
    }
    for(int i = 1; i < n; i++){
        f[i] += f[i - 1];
    }
    set<int> se;
    for(int i = 1; i < n; i++){
        if(s[i] == 'L' && s[i + 1] == 'R'){
            if(f[i] > 0)
                se.insert(i);
        }
    }
    int x;
    while(q--){
        cin >> x;
        if(x > 1){
            if(s[x] == 'R' && s[x - 1] == 'L')
            {
                if(se.count(x - 1))
                    se.erase(x - 1);
            }else if(s[x - 1] == 'L' && s[x] == 'L' && f[x - 1] > 0){
                se.insert(x - 1);
            }
        }
        if(x < n){
            if(s[x + 1] == 'R' && s[x] == 'L')
            {
                if(se.count(x))
                    se.erase(x);
            }else if(s[x] == 'R' && s[x + 1] == 'R' && f[x] > 0){
                se.insert(x);
            }
        }
        if(s[x] == 'R') s[x] = 'L';
        else s[x] = 'R';
        if(se.empty())
            cout << "YES" << endl;
        else cout << "NO" << endl;
    }
}

int main()
{
    int t;
    cin >> t;
    while(t--) solve();
    return 0;
}